package org.example.common.exception;

import org.example.common.response.ResponseEnum;

public class CustomException extends RuntimeException{
    private ResponseEnum responseEnum;

    public CustomException(ResponseEnum responseEnum){
        super(responseEnum.getCode()+":"+responseEnum.getMsg());//让错误的message变成编码：信息类型
    }
    public ResponseEnum getResponseEnum(){
        return responseEnum;           //方法返回一个ResponseEnumL类型的一个对象
    }

}
